package com.dreem.prototype.improve;

/**
 * @program: DesignParrtern
 * @description: 用户类
 * @author: Peng
 * @create: 2021-01-28  11:31
 **/
public class Client {
    public static void main(String[] args) throws CloneNotSupportedException {
        Sheep sheep = new Sheep();
        sheep.setFriend(new Sheep(3, "蒙古", "000004"));
        Sheep clone = sheep.clone();
        Sheep clone1 = sheep.clone();
        Sheep clone2 = sheep.clone();

        System.out.println(sheep.toString());
        System.out.println(clone.toString());
        System.out.println(clone1.getFriend().hashCode());
        System.out.println(clone2.getFriend().hashCode());
    }
}
